/*!
 * @author  Vladimir Kerimov
 * @file    error.h
 * @version 1.0
 * @brief   Error exception
 * @date    2013
 */

/*
 *    ______   __
 *   /  ___/  /__/   __  ___      _____        _____     __    __     _____        __  ___      _____     __  ___
 *  |  |___    __   /  |/   \    / __  \      /  _  \   |  |  |  |   /  _  \      |  |/   \    /  _  \   |  |/   \
 *   \___  \  /  |  |   __   |  | /  __/     |  / \  |  |  |  |  |  |  / \  |     |   __   |  |  / \  |  |   __   |
 *  ____/  /  |  |  |  /  \  |  |   /___     |  \_/  |  |   \_|  |  |  \_/  |     |  /  \  |  |  \_/  |  |  /  \  |
 * /______/   |__/  |__|  |__/   \_____/      \___   |   \___/|__|   \___/|_|     |__|  |__|   \_____/   |__|  |__|
 *                                                |  |
 *                                                |__/
 *
 */

#pragma once

#include <qua/api.h>
#include <qua/lazy.h>
#include <exception>

namespace qua
{
    class text;

    class QUAZAR_API error : public std::exception
    {
    public:
        class data;

        error() throw();
        error( text const& error_message, const char* file_name, int line_no ) throw();

        virtual const char* what() const throw();

        virtual text const& message() const throw();
        virtual text const& in_file() const throw();
        virtual int at_line() const throw();

    private:
        lazy<data> m_data;
    };
}
